<?php
// +---------------------------------------------------------------------------+
// | This file is part of the KnowledgebasePublisher package                   |
// | KnowledgebasePublisher - web based knowledgebase publisher tool           |
// |                                                                           |
// | Author:  Evgeny Leontev <eleontev@gmail.com>                              |
// | Copyright (c) 2005 Evgeny Leontev                                         |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code.                          |
// +---------------------------------------------------------------------------+

require_once 'eleontev/Validator.php';


class SettingValidator
{
	 
	function validate($values) {
		
		$required = array('from_email');

		
		$v =& new Validator($values, true);
		
		$v->required('required_msg', $required);
		$v->regex('email_msg', 'email', 'from_email');
		
		return $v->getErrors();
	}
}
?>